<template>
  <ul class="todo-main">
    <!-- key用的是id，不会出现错误 -->
    <ItemVue
      v-for="todoObj in todos"
      :key="todoObj.id"
      :todo="todoObj"
      :checkTodo="checkTodo"
      :deleteItem="deleteItem"
    >
    </ItemVue>
  </ul>
</template>

<script>
import ItemVue from "./ItemVue.vue";
export default {
  name: "ListVue",
  components: { ItemVue },
  props: ["todos", "checkTodo",'deleteItem'],
};
</script>

<style scoped>
.todo-main {
  margin-left: 0;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0;
}
.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>